<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  const p = new Promise((resolve, reject)=>{
    console.log('开始请求数据.....')
    try {
      throw new Error('您的网络异常请重试！！！')
      setTimeout(()=>{
        console.log('数据请求成功')
        resolve('okk')
        console.log(p)
      },2000)
    }catch (e){
      setTimeout(()=>{
        console.log(e.message)
        reject(e.message)
        console.log('任务执行结束')
        console.log(p)
      },2000)
    }
  })

</script>
</body>
</html>